package com.zoranjoka.chordis.data;

import java.util.ArrayList;
import java.util.List;

import com.zoranjoka.chordis.beans.AlbumBean;
import com.zoranjoka.chordis.beans.ArtistBean;

public class MockDataAlbum implements IDataAlbum {
	
	private List<AlbumBean> albums = new ArrayList<AlbumBean>();
	
	
public MockDataAlbum(){
		addAlbumBean(new AlbumBean(new ArtistBean("BB King"), "BB King Live", 2008));
		addAlbumBean(new AlbumBean(new ArtistBean("2"), "Texas Flood", 1983));
		addAlbumBean(new AlbumBean(new ArtistBean("3"), "Murder Ballads", 1996));
	}

	public ArrayList<AlbumBean> getAllAlbums() {
		return (ArrayList<AlbumBean>) albums;
	}

	public AlbumBean getAlbumByName(String name) {
		for (AlbumBean ab:albums){
			if(ab.getName().equals(name))
				return ab;
		}
		return null;
	}

	public void addAlbumBean(AlbumBean ab) {
		albums.add(ab);		
	}

}
